package com.zjcode.cdcer.mapper;

import com.chinatechstar.component.commons.supports.PageData;
import com.zjcode.cdcer.model.TaskAssignment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.LinkedHashMap;
import java.util.List;

/**
 * @author ZQM
 * @date 2023/9/18 17:37
 */
@Mapper
public interface TaskAssignmentMapper {

    Integer add(@Param("taskAssignment") TaskAssignment taskAssignment);

    Integer del(@Param("id") String id);

    TaskAssignment selAssignmentById(@Param("id") String id);

    Integer edit(@Param("taskAssignment") TaskAssignment taskAssignment);

    List<LinkedHashMap<String, Object>> selList(@Param("pageData") PageData pageData);

    Integer changeStatus(@Param("id") String id,@Param("status") String status);

    List<LinkedHashMap<String, Object>> selByIdList(@Param("idList") List<String> idList,@Param("pageData") PageData pageData, @Param("idsData") Object idsData);

    List<TaskAssignment> selByInstitutionId(@Param("institutionIdList") List<Long> institutionIdList,@Param("pageData") PageData pageData);

    int addBatchTasks(@Param("list") List<TaskAssignment> list);

    Integer selAllTaskNum(@Param("year") String year);

    Integer selectByInstitutionId(@Param("institutionId") String institutionId);
}
